<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>远程视频监控登陆</title>
<link rel='stylesheet prefetch' href='http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css'>
<link rel="stylesheet" href="css/style.css">
</head>

<body onload="getContextPath()">
	<div class="wrapper">
		<form class="form-signin" id="loginForm" action="" method="post">
			<h2 class="form-signin-heading">Please login</h2>
			<input type="text" class="form-control" name="loginName" placeholder="loginName" required="" autofocus="" /> 
			<input type="password" class="form-control" name="password" placeholder="Password" required="" /> 
			<input name="verifycode" maxlength="4" value="code" style="display: none">
			<label class="checkbox">
			<input type="checkbox" value="remember-me" id="rememberMe" name="rememberMe"> Remember me
			</label>
			<button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>
		</form>
	</div>
</body>
<script type="text/javascript">
function getContextPath() {
	var pathName = document.location.pathname;
	var index = pathName.substr(1).indexOf("/");
	var result = pathName.substr(0, index + 1);
	var loginForm = document.getElementById("loginForm");
	loginForm.action = result + "/login";
}
</script>
</html>
